package com.example.online.music.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.online.music.common.R;
import com.example.online.music.model.domain.CartList;
import com.example.online.music.model.request.CartListRequest;

import java.util.List;

/**
 * @author zjs
 * @Date 2023.6.29
 */
public interface CartListService extends IService<CartList> {

    /**
     * 选择歌曲加入购物车
     * @param cartListRequest
     * @return R
     */
    R addCartList(CartListRequest cartListRequest);

    /**
     * 删除购物车项
     * @param userId
     * @param cartListIds
     * @return
     */
    R deleteCartList(Integer userId, List<Integer> cartListIds);

    /**
     * 返回某用户的购物车信息
     * @param userId
     * @return R
     */
    R allCartList(Integer userId);

}
